const path = require('path')
const webpack = require('webpack')
const CopyWebpackPlugin = require('copy-webpack-plugin')
module.exports = {
  entry: './index.js',
  output: {
    path: path.join(__dirname, './dist')
  },
  devServer: {
    clientLogLevel: "none",
    quiet: true,
    contentBase: './dist', // webpack服务器根目录
    hot: true
  },
  module: {
    rules: [
      {
        test: /\.[jt]s$/,
        use: 'ts-loader'
      }
    ]
  },
  plugins: [
    new CopyWebpackPlugin(['./index.html'])
  ]
}